#ifndef ALIYUN_ACS_REQUEST_H_
#define ALIYUN_ACS_REQUEST_H_

#include <map>
#include <vector>
#include "core/utils/string_helper.h"
#include "core/aliyun_types.h"

namespace aliyun {

class ISigner;
class Credential;

class AcsRequest {
public:
  AcsRequest(const string& product, const string& version, const string& action);
  virtual ~AcsRequest();

  virtual string ComposeUrl(ISigner *i_signer, const Credential* credential, const string& domain) = 0;

  const string& GetVersion(void) const;
  virtual void SetVersion(const string& version);

  const string& GetProduct(void) const;
  void SetProduct(const string& product);

  const string& GetAction(void) const;
  void SetAction(const string& action);

  const string& GetAcceptFormat(void) const;
  void SetAcceptFormat(const string& accept_format);

  const string& GetMethod(void) const;
  void SetMethod(const string& method);

  const string& GetProtocol(void) const;
  void SetProtocol(const string& protocol);

  const string& GetRegionId(void) const;
  void SetRegionId(const string& region_id);

  const std::map<string, string>& GetQueryParameters(void);
  void PutQueryParameter(const string& key, const string& value);

  const std::map<string, string>& GetHeaders(void) const;

protected:
  string product_;
  string version_;
  string action_;
  string accept_format_;
  string method_;
  string protocol_;
  string region_id_;
  std::map<string, string> query_parameters_;
  std::map<string, string> headers_;
};

} // namespace aliyun {

#endif // #ifndef ALIYUN_ACS_REQUEST_H_

// end of file
